
#ifndef IAsyncResult_h
#define IAsyncResult_h

#include <Defines.h>
#include <CSharpPropertyMethods.h>
#include <CSharpGarbagePointer.h>

#include <System/Object.h>
#include <System/Threading/WaitHandle.h>

namespace Riccsson
{
	namespace System
	{
		// Summary:
		//     Represents the status of an asynchronous operation.
		interface IAsyncResult
		{
			PROP3GET(IAsyncResult, GC_PTR<object>, AsyncState)
			PROP3GET(IAsyncResult, GC_PTR<Threading::WaitHandle>, AsyncWaitHandle)
			PROP3GET(IAsyncResult, bool, CompletedSynchronously)
			PROP3GET(IAsyncResult, bool, IsCompleted)

			protected: IAsyncResult()
				: PROP3GET_INIT(IAsyncResult, AsyncState)
				, PROP3GET_INIT(IAsyncResult, AsyncWaitHandle)
				, PROP3GET_INIT(IAsyncResult, CompletedSynchronously)
				, PROP3GET_INIT(IAsyncResult, IsCompleted)
			{
			}

			// Summary:
			//     Gets a user-defined object that qualifies or contains information about an
			//     asynchronous operation.
			//
			// Returns:
			//     A user-defined object that qualifies or contains information about an asynchronous
			//     operation.
			PROP3_GET(GC_PTR<object>, AsyncState)
			{
				throw;
			}

			//
			// Summary:
			//     Gets a System.Threading.WaitHandle that is used to wait for an asynchronous
			//     operation to complete.
			//
			// Returns:
			//     A System.Threading.WaitHandle that is used to wait for an asynchronous operation
			//     to complete.
			PROP3_GET(GC_PTR<Threading::WaitHandle>, AsyncWaitHandle)
			{
				throw;
			}

			//
			// Summary:
			//     Gets a value that indicates whether the asynchronous operation completed
			//     synchronously.
			//
			// Returns:
			//     true if the asynchronous operation completed synchronously; otherwise, false.
			PROP3_GET(bool, CompletedSynchronously)
			{
				throw;
			}

			//
			// Summary:
			//     Gets a value that indicates whether the asynchronous operation has completed.
			//
			// Returns:
			//     true if the operation is complete; otherwise, false.
			PROP3_GET(bool, IsCompleted)
			{
				throw;
			}

		};
	}
}

#endif